import Login from '@/views/login'
import Main from '@/views/main'

export default [
  {
    path: '/',
    name: 'Login',
    component: Login
  },
  {
    path: '/main',
    name: 'Main',
    component: Main,
    children: [
      {
        path: 'home',
        name: 'Home',
        component: resolve => {
          require(['@/views/home'], resolve)
        }
      },
      {
        path: 'newslist',
        name: 'NewsList',
        component: resolve => {
          require(['@/views/news/news-list'], resolve)
        }
      },
      {
        path: 'newslist/newsedit',
        name: 'NewsListNewsEdit',
        component: resolve => {
          require(['@/views/news/news-publish'], resolve)
        }
      },
      {
        path: 'newspublish',
        name: 'NewsPbulish',
        component: resolve => {
          require(['@/views/news/news-publish'], resolve)
        }
      }
    ]
  },
  {
    path: '/preview',
    name: 'Preview',
    component: resolve => {
      require(['@/components/preview'], resolve)
    }
  }
]
